import { httpGet, httpPost } from '@/http'
import { services } from '@/config'

export const getMembers = (groupId, memberId) =>
  httpGet(`${services.commonService}im-group-member/getMembers`, { groupId, memberId })
export const toggleAdmin = (groupId, memberId) =>
  httpPost(`${services.commonService}im-group-member/toggleAdmin`, { groupId, memberId }, true)
export const toggleBan = (groupId, memberId) =>
  httpPost(`${services.commonService}im-group-member/toggleBan`, { groupId, memberId }, true)
export const removeMember = (groupId, memberId) =>
  httpPost(`${services.commonService}im-group-member/removeMember`, { groupId, memberId }, true)
export const addMember = (groupId, userIds) =>
  httpPost(`${services.commonService}im-group-member/addMember`, { groupId, userIds }, true)
